package GUI;

import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;

import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import javax.swing.UIManager;

public class SystemUser_Menu extends JPanel {
	
	private Client_GUI parent;
	
	public SystemUser_Menu(final Client_GUI parent){
		this.parent = parent;
		
		this.setSize(parent.MENU_WIDTH, parent.MENU_HEIGHT);
		setLayout(null);
		this.setBackground(Color.WHITE);

		JPanel panel = new JPanel();
		panel.setBounds(10, 11, 130, 74);
		add(panel);
		panel.setLayout(new GridLayout(0, 1, 0, 0));
		
		Button button = new Button("Login");
		panel.add(button);
		
		Button button_1 = new Button("Search Book");
		panel.add(button_1);
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				
				SearchBook topaint = new SearchBook(parent,SearchBook.SEARCH,null);
				parent.RepaintMain(topaint);
			}
			
		});
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Login_GUI login = new Login_GUI(parent);
				parent.RepaintMain(login);
			}
		});
	}

}
